Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Graphics /
Chapter 3 - Geometric Styles / Geometric Styles Reference
Functions / Getting and Setting Dashes


GXGetStyleDash

You can use the GXGetStyleDash function to retrieve the dash information from a style object.

gxDashRecord *GXGetStyleDash(gxStyle source, gxDashRecord *dash);
source
A reference to the style object whose dash information you want to retrieve.
dash
A pointer to a gxDashRecord structure. On return, this structure contains the dash information for the source style object.
function result
A copy of the gxDashRecord structure associated with the source
style object.
DESCRIPTION
The GXGetStyleDash function returns as its function result, and in the dash parameter, a pointer to a gxDashRecord structure containing the dash information for the style object specified by the source parameter.

This function creates a new shape to encapsulate the dash geometry and places a reference to this shape in the dash field of the returned gxDashRecord structure. You should dispose of this shape when you no longer need it.

Since this function copies the dash information from the source style, you may make changes to the gxDashRecord structure returned by this function without affecting the source style's dash information. If you want to change the dash information in the source style, you must use the GXSetStyleDash function.

SPECIAL CONSIDERATIONS
Unless an error results, the GXGetStyleDash function creates a shape; you are responsible for disposing of this shape when you no longer need it. See Inside Macintosh: QuickDraw GX Objects for information about disposing of QuickDraw GX objects.

ERRORS, WARNINGS, AND NOTICES
Errors
out_of_memory
style_is_nil
parameter_is_nil
SEE ALSO
For a discussion of dashes, see "Dashes" on page 3-27.

For examples of adding dashes to shapes, see page 3-66 through page 3-86.

For a discussion of the gxDashRecord structure and a description of what types of shapes you can use as dash shapes, see "The Dash Structure" on page 3-103.

To specify dash information for a style object, use the GXSetStyleDash function, which is described in the next section.

To retrieve dash information from a style object associated with a particular shape, use the GXGetShapeDash function, which is described on page 3-138. To specify dash information for a style object associated with a particular shape, use the GXSetShapeDash function, which is described on page 3-139.

To determine where dashing occurs for a particular shape, use the GXGetShapeDashPositions function, which is described on page 3-140.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help